package main

import "fmt"

/*func main()  {
	ch:=make(chan int)

	var sendCh chan<-int=ch
	sendCh<-789
	//num := <- sendCh
	var recvCh<-chan int=ch
	num:=<-recvCh
	fmt.Println("num=",num)
}*/

func send(out chan<- int) {
	out <- 89
	close(out)
}
func recv(in <-chan int) {
	n := <-in
	fmt.Println("读到", n)
}
func main() {
	ch := make(chan int)
	go func() {
		send(ch)
	}()
	recv(ch)

}
